Skip to content

Conversation

GuillaumeGomez
Copy link
Member

Fixes bug reported in this comment.

r? @lolbinarycat

@rustbot rustbot added A-run-make Area: port run-make Makefiles to rmake.rs S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. labels Oct 20, 2025
@lolbinarycat
Copy link
Contributor

  1. I think we should include the path of the file we are trying to execute in the error
  2. (related) the message "failed to spawn rustc process" is a bit misleading, since (as far as I understand it) the entire point of this flag is you can pass an executable that isn't rustc, and such an error would likely cause an error to debug issues with rustc, instead of debugging their wrapper.

I think a message like "failed to spawn {compiler_path:?}: {error:?}" would be significantly more clear and helpful.

@GuillaumeGomez GuillaumeGomez force-pushed the graceful-doctest-error-handling branch from 4e0541a to 0c495ae Compare October 21, 2025 10:23
@GuillaumeGomez
Copy link
Member Author

Agreed, improved error messages.

@GuillaumeGomez GuillaumeGomez changed the title [rustdoc] Gracefully handle in case we cannot run the compiler in doctests [rustdoc] Gracefully handle error in case we cannot run the compiler in doctests Oct 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-run-make Area: port run-make Makefiles to rmake.rs S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants